export const get = (key) => {
	return new Promise((resolve, reject) => {
		uni.getStorage({
			key,
			success({
				data = null
			}) {
				resolve(data)
			},
			fail() {
				resolve(null)
			}
		})
	})
}

export const set = (key, data) => {
	return new Promise((resolve, reject) => {
		uni.setStorage({
			key,
			data,
			success(res) {
				resolve(res)
			},
			fail(e) {
				reject(e)
			}
		})
	})
}
export const remove = (key) => {
	return new Promise((resolve, reject) => {
		uni.removeStorage({
			key,
			success(res) {
				resolve(res)
			},
			fail() {
				reject()
			}
		})
	})
}
